package cn.zhentao.service.impl;

import cn.zhentao.dao.TeacherDao;
import cn.zhentao.pojo.Teacher;
import cn.zhentao.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherDao dao;

    @Override
    public List<Teacher> findAll() {
//        throw new RuntimeException();
        return dao.findAll();
    }

    @Override
    public List<Teacher> findByName(String tname) {
        return dao.findByName(tname);
    }
}
